package com.hellobike.haxing.modules.supplier.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hellobike.haxing.modules.supplier.entity.TSupplierClProRecord;
import com.hellobike.haxing.modules.supplier.mapper.TSupplierClProRecordMapper;
import com.hellobike.haxing.modules.supplier.service.ITSupplierClProRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 供应商商品表记录表
 * @Author: haxing-boot
 * @Date:   2020-01-15
 * @Version: V1.0
 */
@Service
public class TSupplierClProRecordServiceImpl extends ServiceImpl<TSupplierClProRecordMapper, TSupplierClProRecord> implements ITSupplierClProRecordService {

    @Autowired
    private TSupplierClProRecordMapper tSupplierClProRecordMapper;

    @Override
    public List<TSupplierClProRecord> getDupClPro(Long skuId){
        return tSupplierClProRecordMapper.getDupClPro(skuId);
    }

    @Override
    public List<TSupplierClProRecord> getBySupplierId(Long headerId) {
        QueryWrapper<TSupplierClProRecord> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", headerId);
        List<TSupplierClProRecord> tSupplierClPros = tSupplierClProRecordMapper.selectList(queryWrapper);
        return tSupplierClPros;
    }
}
